package Utils;

import java.util.Objects;

public record Edge <T1,T2>(T1 left, T2 right){
    public Edge(T1 left, T2 right) {
        //当出现 null 点的时候可以按照输入的提示词来提示报错
        this.left = Objects.requireNonNull(left,"left node is null");
        this.right = Objects.requireNonNull(right,"left node is null");
    }

    @Override
    public String toString() {
        return "(" + left + ", " + right + ")";
    }
}
